package org.learn.java.dubbo.rest;

import java.util.HashMap;
import java.util.Map;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
import org.springframework.stereotype.Service;


@Path("/loginService")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8 })
@Service("loginService")
public class LoginServiceImpl implements LoginService {

	@Override
	@GET
	@Path("/login/{userId}")
	public Map<String,Object> login(@PathParam("userId")String userId) {
		System.out.println("--------------------------");
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("result", "ok");
		return map;
	}

}
